﻿using System;
using System.ComponentModel;

namespace Cashbook.ViewModels
{
    public class BillVM: INotifyPropertyChanged
    {
		private int _id;		
		public int Id
		{
			get
			{
				return _id;
			}
			set
			{
				this._id = value;
				OnPropertyChanged(nameof(Id));
			}
		}

		private string _title;
		
		public string Title
		{
			get
			{
				return _title;
			}
			set
			{
				this._title = value;
				OnPropertyChanged(nameof(Title));
			}
		}

		private string _customerName;
		
		public string CustomerName
		{
			get
			{
				return _customerName;
			}
			set
			{
				this._customerName = value;
				OnPropertyChanged(nameof(CustomerName));
			}
		}


		private int _amount;
	
		public int Amount
		{
			get
			{
				return _amount;
			}
			set
			{
				this._amount = value;
				OnPropertyChanged(nameof(Amount));
			}
		}

		private int _payedAmount;

		public int PayedAmount
		{
			get
			{
				return _payedAmount;
			}
			set
			{
				this._payedAmount = value;
				OnPropertyChanged(nameof(PayedAmount));
			}
		}



		private bool _isPayed;
		
		public bool IsPayed
		{
			get
			{
				return _isPayed;
			}
			set
			{
				this._isPayed = value;
				OnPropertyChanged(nameof(IsPayed));
			}
		}

		private DateTime _addedDate;
		
		public DateTime AddedDate
		{
			get
			{
				return _addedDate;
			}
			set
			{
				this._addedDate = value;
				OnPropertyChanged(nameof(AddedDate));
			}
		}


		

		public event PropertyChangedEventHandler PropertyChanged;
		private void OnPropertyChanged(string propertyName)
		{
			this.PropertyChanged?.Invoke(this,
			  new PropertyChangedEventArgs(propertyName));
		}
    }
}
